import yaml

jsons = '''
{
    "code": 200,
    "data": {
        "birthday": "2011-1-1",
        "allowOrder": true,
        "idType": 1,
        "rongToken": "1YPc0RcYhanAaiqYaOm67wFSXbdXDIgchc+n79+AthU=@ovdl.cn.rongnav.com;ovdl.cn.rongcfg.com",
        "gender": 1,
        "allowComment": true,
        "avatar": null,
        "isNew": false,
        "idNumber": "500228199707116557",
        "wbName": null,
        "isRealname": false,
        "appleName": null,
        "userCode": "60045582",
        "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiI2MDA0NTU4MiIsInNjb3BlIjpbImFsbCJdLCJpZCI6MCwiZXhwIjoxNjIzMjE1MTMzLCJhdXRob3JpdGllcyI6WyJBRE1JTiJdLCJqdGkiOiI2NTM2N2EwMC0zZjU3LTQwMDQtYThiNS0zMzg2NjhhMTM5ZGIiLCJjbGllbnRfaWQiOiJjbGllbnQtYXBwIn0.GQiKvoH0oHHFueWWpJgYLH1FANu8BL7LIi_VYDBrvLjeQ6ZqRDqPx1JPeJ7VoYTtpNXkm0alwitdnkIK3Y4y1Yt7yOY4ObVCN5lNhcm34_wBKKXQ3tJuPPmSuPO4FKu18KCC_nQrAarErHj4swMZ3cuPsYKFXiDCbkLO4ZwFP13pCPCr7hlFxYIHX6b3DFbH9-xzs9GMDYngD16WnL-RBX-SXPNBZhzTiSU2wCSbAZiSwpTsLxz3WimvVOSUVmqBOzre_4zL9KRLGSvuF8ZyA-0Kxn35Mql8xUrLa2qT4ziImAVOwwr3emqdsq41ft8wAiqNrh-kZrN3eYxJVFSyKQ",
        "realName": "陈梦圆",
        "categoryTag": [
            {
                "level": 9,
                "tagId": 1,
                "productTypeName": "和田玉",
                "type": 1
            },
            {
                "level": 8,
                "tagId": 2,
                "productTypeName": "翡翠",
                "type": 2
            }
        ],
        "phone": "18723530812",
        "intro": "blkivviigviviivviivibkgiggiigigiggiviiviohohohoho",
        "nickname": "小李😁",
        "qqName": null,
        "allowMessage": true,
        "credit": 100,
        "wechatName": null,
        "hasPayPassword": false
    },
    "t": 1623128733519,
    "extra": "nacos动态gateway配置136",
    "message": "操作成功",
    "ts": "2021-06-08 13:05:33"
}
'''
from jsonpath import jsonpath
import json
# result = jsonpath(json.loads(jsons), '$..token')
# # print(result)
# g={}
##
# a = '{"token":"$..productTypeName"}'
# for k,v in json.loads(a).items():
#     print(k,v)
#     g[k]=jsonpath(json.loads(jsons), '$..productTypeName')
# print(g)
print(yaml.safe_load(open('../config/global.yml', 'r', encoding='utf8')))